Part Number Hot Search : 
MBT22 SCN2674T 406C34 LV5781 FXT449SM JRC455 C0603X A5800952
Product Description
Full Text Search
 

To Download UM1510 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  april 2012 doc id 022713 rev 1 1/69 UM1510 user manual stm32l152d-eval demonstration firmware introduction this user manual describes the demonstration firmware running on the stm32l152d-eval evaluation board, which can be used to ev aluate the capabilities of the stm32l152zd(t6) microcontroller and on-board peripherals. this demo contains many applications that can be easily reused, such as rtc calendar, file system fat implementation on sd card, wave player with stm32 i2s peripheral, voice recording, automatic measure of the power consumption in several operating modes, dual interface eeprom applications (esl and datalogger), temperature sensor interfacing and tft lcd. the stm32l152d-eval board is delivered with the demonstration programmed in the internal flash memory, and all the files needed by the demonstration are programmed in the microsd card. the demonstration is executed at each reset (board power-up, external reset, etc.). in case the stm32l152d-eval board was not factory-programmed or the demonstration application was erased, the bootloader, iap or usb dfu can be used to program this file. for more details, refer to section 3: stm32l152d-eval demonstration package and section 4: stm32l152d-eval demonstration programming . note: before you execute the demonstration, make sure that all eval board jumpers are well configured. for more details, refer to section 1.10.11: stm32l152d-eval board jumper configuration . this demonstration firmware and other such firmware are available for download from the stmicroelectronics website: www.st.com . www.st.com
contents UM1510 2/69 doc id 022713 rev 1 contents 1 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1 power control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 clocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 reset control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 debug jtag interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.5 serial wire debugger interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.6 embedded st-link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.7 display devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.7.1 lcd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.7.2 lcd glass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.7.3 leds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.8 interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.8.1 rs232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.9 irda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10 miscellaneous peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.1 joystick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.2 push-buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.3 12-bit analog-to-digital converter (adc) . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.4 audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.5 microsd card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.6 serial eeprom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.10.7 m24lr64 dual interf ace eeprom (rf/i2c) . . . . . . . . . . . . . . . . . . . . . . 9 1.10.8 sram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.10.9 nor flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.10.10 temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.10.11 stm32l152d-eval board jumper configuration . . . . . . . . . . . . . . . . . . . 9 2 running the demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1 menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.1 demo startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.1.2 navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 clock sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 clock control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
UM1510 contents doc id 022713 rev 1 3/69 2.2.2 clock failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3 stm32l152zd(t6) resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.1 peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.2 interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.3 external interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.4 internal memory size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3.5 external memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.4 demo applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.4.1 product presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.4.2 calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.4.3 image viewer submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.4.4 wave player submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.4.5 voice recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.4.6 idd measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.4.7 thermometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 2.4.8 usb mass storage submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.4.9 dual interface eeprom (rf/i2c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.4.10 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.4.11 help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.4.12 about submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3 stm32l152d-eval demonstration package . . . . . . . . . . . . . . . . . . . . 64 4 stm32l152d-eval demonstrati on programming . . . . . . . . . . . . . . . . 66 4.1 programming the media files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2 programming the demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2.1 using bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2.2 using iap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2.3 using usb dfu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.2.4 using preconfigured projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
list of figures UM1510 4/69 doc id 022713 rev 1 list of figures figure 1. evaluation board overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 figure 2. structure of the demonstration menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 figure 3. sd card check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 figure 4. warning message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 figure 5. st logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 figure 6. stm32l presentation slide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 figure 7. time and date configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 figure 8. main menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 figure 9. corresponding submenus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 figure 10. navigating in the demonstration menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 figure 11. clock tree diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 12. no hse clock detected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 13. standby mode entered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 14. internal flash memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 figure 15. microsd card organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 figure 16. sd card removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 figure 17. product presentation is ready to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 figure 18. first presentation slide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 19. last presentation slide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 20. no loaded wave file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 21. end of slide show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 22. setting the time and date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 23. time adjust submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 24. time show submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 25. setting the year. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 26. setting the month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 27. setting the day of the month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 28. exiting the date show submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 29. setting the alarm activation time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 30. alarm show submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 31. message displayed if time and date need setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 32. image viewer submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 33. stm32 image viewer listbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 figure 34. audio playback architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 figure 35. wave player submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 figure 36. wave player interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 figure 37. wave player now playing submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 38. voice recording submenu selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 figure 39. voice recording submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 40. starting voice record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 41. i dd measure menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 42. run 32mhz mode display submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 43. run 1mhz mode display submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 figure 44. rtc on or off selection submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 figure 45. enter run lp mode submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 figure 46. run lp mode display submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 figure 47. enter sleep mode submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 figure 48. sleep mode display submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
UM1510 list of figures doc id 022713 rev 1 5/69 figure 49. enter sleep lp mode submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 50. sleep lp mode display submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 51. enter stop mode submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 52. stop mode display submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 53. enter standby mode submenu-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 figure 54. enter standby mode submenu-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 figure 55. standby mode display submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 figure 56. i dd bias measurement menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 figure 57. measure bias submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 figure 58. measure bias mode (procedure start) submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 figure 59. stop mode display submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 figure 60. reset bias value submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 figure 61. reset bias value (procedure start) submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 62. thermometer submenu selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 63. temperature display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 figure 64. warning temperature display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 figure 65. temperature sensor error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 figure 66. usb mass storage submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 figure 67. usb mass storage submenu selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 68. usb cable connected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 69. ant7-m24lr-a dual interface eeprom daughter board . . . . . . . . . . . . . . . . . . . . . . . . . 51 figure 70. m24lr64-r block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 figure 71. dual interface eeprom applications menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 figure 72. esl application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 figure 73. esl setting menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 figure 74. datalogger block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 figure 75. datalogger dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 figure 76. datalogger curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 figure 77. applications menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 figure 78. stopwatch submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 figure 79. timer submenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 figure 80. light intensity level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 figure 81. help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 figure 82. navigation menu-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 figure 83. navigation menu-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 figure 84. jumpers config menu-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 85. jumpers config menu-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 86. jumpers config menu-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 87. jumpers config menu-4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 88. jumpers config menu-5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 89. about submenu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 90. stm32l152d-eval demo package directory tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 figure 91. sd card directory organization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
functional description UM1510 6/69 doc id 022713 rev 1 1 functional description the stm32l152zd(t6) microcontroller evaluation board provides a development and demonstration platform for stm32l152d-based applications. it is designed to allow the user to try out the major functions of the stm32l152zd(t6) microcontroller. figure 1 summarizes the main functional blocks of the evaluation board. figure 1. evaluation board overview 1.1 power control the evaluation board can be powered from an external 5 v supply or from the usb connector or st-link connector. all other required voltages are provided by on-board voltage regulators. gpio com p arator ts controller dac/ adc usb fs seg i2c fsmc usar t3 spi adc jtag potentiome t jo y stick leds wakeup button ldr touch slider 2 pins c onn ecto r lcd gla ss usb connecto r eeprom volt age t rans lator rs232 transceiver irda transceiver dot matrix lcd sram/nor flash sdio microsd card i2s embedded st-link/v2 usb typeb connector jtag & trace connector 1.65v to 3.5 v adjusta ble regulator 3.3v regulator mcu c onsum ption measureme n extension c onnect or fo r gpios microphone stm32l152zdt6 audio amplifier usart1 connector dual i/f eeprom temperature sensor opamp1 opamp3 opamp2
UM1510 functional description doc id 022713 rev 1 7/69 1.2 clocking two clock sources are available on the stm32l152d-eval evaluation board: 32 khz crystal for embedded rtc and glass lcd 8 mhz crystal for the stm32l152zd main clock system 1.3 reset control the reset can be generated by hardware or software: reset button: activates th e reset input when pressed jtag reset 1.4 debug jtag interface software debug is done via the standard arm ? jtag connection: 20-pin idc (insulation displacement connector) for connection to the standard arm host interface. 1.5 serial wire debugger interface the serial wire debug port (swd-dp) provides a 2-pin (clock + data) interface to the ahp- ap port. 1.6 embedded st-link an embedded st-link is integrated on the board as an embedded in-circuit debugger and programmer for the stm32l152zd mcu. 1.7 display devices 1.7.1 lcd a color lcd module is mounted on the stm32l152d-eval board. it is interfaced through the embedded fsmc peripheral. 1.7.2 lcd glass an lcd glass module is mounted on the stm32l152d-eval board. it is interfaced through the embedded lcd glass peripheral. 1.7.3 leds four general-purpose leds are available. they are used as a display.
functional description UM1510 8/69 doc id 022713 rev 1 1.8 interfaces 1.8.1 rs232 the stm32l152 evaluation board (stm32l152d-eval) provides one on-board rs-232 serial port. rs232 port (usart1) is accessed via cn1 connectors. 1.9 irda the stm32l152d-eval evaluation board supports irda communication. the interface is mounted on usart1. 1.10 miscellaneous peripherals 1.10.1 joystick four-direction joystick with a selection key. 1.10.2 push-buttons the stm32l152d evaluation board (stm32l152d-eval) provides only one push-button (key). this key can be used as a user push-button, a tamper push-button or a wakeup push- button (to wake-up the processor from a low-power mode). 1.10.3 12-bit analog-to-di gital converter (adc) varistor: adc channel ( adc1_in18 ) connected to an on-board variable resistor. the variable resistor provides a voltage in the range of 0 v to 3.3 v. 1.10.4 audio the stm32l152d-eval evaluation board supports stereo audio play thanks to an audio dac cs43l22 connected to both i2s2 ports, and one channel of dac in microcontroller stm32l152zd. for the audio output, an audio jack is available on the board and connected to the cs43l22 output. the u3 microphone is connected to adc internal through opamp1. 1.10.5 microsd card the stm32l152d-eval evaluation board has a microsd card connector connected to the sdio peripheral. 1.10.6 serial eeprom the stm32l152d-eval evaluatio n board includes a serial eeprom connected to the spi1 peripheral.
UM1510 functional description doc id 022713 rev 1 9/69 1.10.7 m24lr64 dual inte rface eeprom (rf/i2c) the m24lr64 dual interface eeprom daughter board implemen ted on the module is the m24lr64-r. the daughter board can be connected on cn12 to stm32l152zdt6 via i2c bus. i2c device select of the m24lr64 is 1010 e2e1e0. for more details about the m24lr64 memory addressing in i2c mode, please refer to the m24lr64 datasheet. 1.10.8 sram the stm32l152d-eval evaluation board includes a 512kx16 sram connected to bank2 of fsmc interface. 1.10.9 nor flash the stm32l152d-eval evaluation board provides a 128-mbit of nor flash connected to bank1 of fsmc interface. 1.10.10 temperature sensor the stm32l152d-eval evaluation board includes an i 2 c temperature sensor connected to the i2c1 peripheral. 1.10.11 stm32l152d-eval boa rd jumper configuration to be able to run the stm32l152d-eval demo correctly, configure the following stm32l152d-eval board jumpers as follows: jp1: fitted in psu position jp2: fitted in ldr position jp4: fitted in rs232 position jp5: fitted in vdd position <->3.3 v jp6, jp8: fitted in position 1<->2 jp7: fitted in position 1<->2 jp10: fitted in idd position jp14 i2c_smb: fitted the lcd glass should be in io position.
running the demonstration UM1510 10/69 doc id 022713 rev 1 2 running the demonstration 2.1 menu figure 2 shows the menu system of the stm32l152d demonstration. the main menu is shown on the left-hand side. the up, down, right and left joystick directions allow the user to navigate between items in the main menu and the submenus. to enter a submenu, press the sel push-button. the sel push-button designates the action of vertically pressing the top of the joystick, as opposed to moving it horizontally up, down, right or left. to exit a submenu, select the return menu and press sel.
UM1510 running the demonstration doc id 022713 rev 1 11/69 figure 2. structure of the demonstration menus stm32l152d welcome message product presentation start return calendar date return image viewer image viewer wave player return wave player about return adjust show return time adjust show return alarm adjust show return thermometer return temperature help idd measure return return idd sleep mode usb return usb mass storage idd sleep lp mode idd stop mode idd run lp mode idd standby mode ms18654 bias measurement applications timer jumpers config stopwatch about return menu navigation ldr return m24lr64 dual interface eeprom (rf/i2c) datalogger return esl voice recording player return record idd run 1 mhz mode idd run 32 mhz mode main menu
running the demonstration UM1510 12/69 doc id 022713 rev 1 2.1.1 demo startup after a board reset, at demo startup, the system checks if an sd card memory is already present in connector cn3. if no card is detected, the demo does not start and the message shown in figure 3. is displayed on the lcd screen. figure 3. sd card check the demo continues only if an sd card is inserted. then, the demo graphic icons and bitmap files are checked in the microsd card (see section 2.3.5: external memory organization ). all the icons have to be correctly programmed in the microsd card for the demo to start, so if an icon is missing, the demo does not start and the message shown in figure 4 is displayed on the lcd screen. figure 4. warning message however, if the icons are correctly loaded into the sd card memory, the welcome screen is displayed and the st logo appears on the lcd (see figure 5 ). please insert sdcard please insert sdcard warning no loaded bitmap files. demo can?t be executed. please be sure that all files are correctly programmed in the microsd card then restart demo
UM1510 running the demonstration doc id 022713 rev 1 13/69 figure 5. st logo then, after 1 second, an stm32 presentation slide is displayed on the lcd screen. figure 6. stm32l presentation slide when the board is powered-up for the first time, the user is prompted to set the time, year, month and day. the user may choose to ignore it by pressing any key except for the sel push-button to abort the configuration sequence. to set the time and date, the user must press sel and follow the setting sequence. the message shown in figure 7 appears on the lcd screen. figure 7. time and date configuration note: 1 if the user chooses to configure the time and date, the time adjust and date adjust menus are displayed. otherwise, the main menu is displayed and the user can set the time parameters in the calendar menu. to set the time/date, use the joystick up/down and sel push-buttons. 2 if the time configuration has already been done, then the number of elapsed days (higher than 1 day), from the last time the demo board was powered-up, appears on the lcd screen. it is soon followed by the current date.
running the demonstration UM1510 14/69 doc id 022713 rev 1 once the time/date have been set, the main menu appears. the main menu is displayed in the form of a set of icons. it shows all the submenus in the same screen. you can navigate using the up, down, right and left joystick directions to select the required submenu. to enter a submenu, press the sel joystick push-button, and the new submenu corresponding to the selected icon is displayed. figure 8. main menu note: the icons shown in figure 8 are taken from http://commons.w ikimedia.org/wiki/crystal_clear. once a submenu has been selected, the name of the application is listed at the top of the display and all the corresponding submenus are listed below, as shown in figure 9 . figure 9. corresponding submenus 2.1.2 navigation the demonstration menu is based on circular navigation, submenu selection, item selection and back navigation, as described in figure 10 .
UM1510 running the demonstration doc id 022713 rev 1 15/69 figure 10. navigating in the demonstration menus the user navigates using the joystick push-buttons located on the evaluation board: right, left, sel, up and down. the up, down, right and left push-buttons are used to perform circular navigation in the main menu and the current menu items. the sel push-button selects the current item. the up and down push-buttons are used for vertical navigation in the submenus. to return to the upper menu, go to the return line and press sel. item 1 item 2 item 3 item 4 item 5 item 6 item 7 item 8 item 9 item 10 item 11 item 12 item 3 item 3.1 right left right left right left right left right left right left right left right left right left left left left right right down up down up down up down up down up down up down up down up up up up up right down down down down item 3.2 item 3.n return ... item 3.1.1 item 3.1.2 item 3.1.n return ... select select select ai15162
running the demonstration UM1510 16/69 doc id 022713 rev 1 2.2 clock sources 2.2.1 clock control the stm32l152zd?s internal clocks are derived from the hse (clocked by the external 8 mhz crystal). in this demo application, the various system clocks are configured as follows: system clock is set to 32 mhz: the pll is used as the system clock source: 32 mhz (1 wait state, flash memory prefetch buffer enabled). hclk frequency is set to 32 mhz. timer clock (timclk) is set to 32 mhz. usb clock is set to 48 mhz. adc clock is set to 16 mhz. pclk1 is set to 32 mhz. pclk2 is set to 32 mhz. only the rtc is clocked by a 32 khz external oscillator. figure 11 illustrates the clock tree organization for this demo.
UM1510 running the demonstration doc id 022713 rev 1 17/69 figure 11. clock tree diagram ahb prescaler /1, 2..512 apb1 prescaler /1, 2, 4, 8, 16 pclk1 hclk to ahb bus, core, memory and dma peripherals to apb1 peripheral clock enable enable peripheral clock apb2 prescaler /1, 2, 4, 8, 16 pclk2 to tim9, 10, and 11 peripherals to apb2 peripheral clock enable enable peripheral clock 32 mhz max 32 mhz max to cortex system timer /8 clock enable sysclk timxclk timxclk fclk cortex free running clock to tim2,3,4,5, 6 and 7 if (apb1 prescaler =1) x1 else x2 if (apb2 prescaler =1) x1 else x2 32 mhz max hse osc 1-24 mhz osc_in osc_out hsi rc 16 mhz x3,x4,x6,x8 x12,x16,x24 pllmul pllclk hsi hsi hse pllsrc sw css x32,x48 /2,/3,/4 48 mhz usbclk to usb interfa ce plldiv to adc peripheral clock enable adcclk 32 mhz max osc32_in osc32_out lse osc 32.768 khz lsi rc 37 khz to independent watchdog (iwdg) mco pllclk hsi hse lse lsi /2,4, 8,16 to rtc mcosel rtcclk rtcsel[1:0] iwdgclk sysclk /1,2,4, 8,16 msi lse lsi to lcd to timer 9, 10, 11 etr hse = high-speed external clock signal lse = low -speed external clock signal lsi = low-speed internal clock signal hsi = high-speed internal clock signal legend : mb18926v1 ms i = multispeed internal clock signal pllvco/2 msi rc msi 48 mhz sdioclk to sdio interface
running the demonstration UM1510 18/69 doc id 022713 rev 1 2.2.2 clock failure at any demo level, if no clock is present on osc_in (broken or disconnected crystal), the message shown in figure 12 is displayed on the lcd screen. figure 12. no hse clock detected if the 8 mhz crystal is not reconnected in the next few seconds, the mcu enters standby mode. if the 8 mhz crystal is reconnected within a few seconds, a system reset is generated. note: the clock security system (css) feeds the mcu with the msi osc used as an emergency clock, if no clock is detected. when a timeout occurs, the mcu enters standby mode and the message shown in figure 13 is displayed on the lcd screen. figure 13. standby mode entered note: the demo does not restart as long as the 8 mhz crystal is not present. connecting the 8 mhz crystal after reset may not restart the demo correctly. the crystal must be connected before starting the demo.
UM1510 running the demonstration doc id 022713 rev 1 19/69 2.3 stm32l152zd(t6) resources 2.3.1 peripherals all used peripherals are described in ta b l e 1 . 2.3.2 interrupts ta bl e 2 shows all the enabled interrupts. table 1. stm32l152zd(t6) demo peripherals used peripherals application i2c1 temperature sensor, dual interface eeprom (rf/i2c) i2s2 audio playback, product presentation exti menu navigation + joystick + push-button + idd measure + audio + applications gpio all applications + leds nvic all applications using interrupts pwr idd measure rcc all applications + demo kernel rtc calendar + applications (stopwatch and timer) fsmc color lcd systick generate 10 ms time base tim2 led toggling sdio microsd tim3 and tim4 voice recording adc1 voice recording + idd measure spi1 spi flash dac ldr (define the comparator level) usb usb mass storage opamp3 low pass filter for the audio demo comp ldr (brightness level) table 2. stm32l152zd demo interrupts interrupts priority used for systick preemption: 0 subpriority: 0 system timing pvd preemption: 0 subpriority: 0 adapt the system clock to voltage range rtc wake-up preemption: 1 subpriority: 1 calendar, date update
running the demonstration UM1510 20/69 doc id 022713 rev 1 2.3.3 external interrupts nmi preemption(fixed): -2 css interrupt exti0 preemption: 0 subpriority: 0 wake-up button exti9_5 preemption: 3 subpriority: 2 menu navigation exti15_10 preemption: 2 subpriority: 2 menu navigation i2c1 error preemption: 0 subpriority: 0 smbus alert interrupt tim4_up preemption: 1 subpriority: 0 enable sdio write operation tim3_up preemption: 0 subpriority: 1 sampling rate tim2_up preemption: 1 subpriority: 1 led toggling rtc tamper preemption: 1 subpriority: 1 tamper generation rtcalarm preemption: 1 subpriority: 1 alarm generation comp preemption: 2 subpriority: 1 lcd glass contrast adjust sdio preemption: 0 subpriority: 0 writing in the sdio dma1 preemption: 0 subpriority: 0 dma1 transfer comp spi2 preemption: 0 subpriority: 0 i2s interrupt usb preemption: 0 subpriority: 0 usb sub-demo table 2. stm32l152zd demo interrupts (continued) interrupts priority used for table 3. stm32l152zd demo external interrupts external interrupts used for exti line 13 joystick sel (interrupt mode, falling edge) exti line 11 joystick up (interrupt mode, falling edge) exti line 6 joystick left (interrupt mode, falling edge) exti line 7 joystick right (interrupt mode, falling edge) exti line 8 joystick down (interrupt mode, falling edge) exti line 0 user button (interrupt mode, falling edge)
UM1510 running the demonstration doc id 022713 rev 1 21/69 2.3.4 internal memory size figure 14. internal flash memory organization 2.3.5 external memory organization the stm32l152d-eval demo is based on an embedded free fat file system, fatfs. the file system is needed to read all media information from the on-board microsd card memory. the sd card memory is organized in three subdirectories: stfiles: this directory contains all the required demo media files (icons, waves and slides). user files located in this folder cannot be handled by demo; only default files are managed. user: this is a user folder. the user can add his/her own files here to be played inside the demo menus (pictures and waves). this folder is used only by the image viewer and wave player submenus. for more details on the various files properties, please refer to section 2.4.3: image viewer submenu and section 2.4.4: wave player submenu . rec: this directory contains the voice record ed wave file ?rec_wave.wav?.(this folder will be created when the voice recording application is run). note: the stfiles directory and its internal files are mandatory for demo startup. fatfs is a generic fat file system module for small embedded systems. the fatfs is written in compliance with ansi c and completely separated from the disk i/o layer. for more details, refer to the following link: http://elm-chan.org/fsw/ff/00index_e.htmltml. exti line 17 rtc alarm (interrupt mode, rising edge) exti line 20 rtc wake up (interrupt mode, rising edge) exti line 22 comparator (interrupt mode, rising and falling edge) table 3. stm32l152zd demo external interrupts (continued) external interrupts used for stm32l152zdt6 0x0800 0000 0x0805 ffff
running the demonstration UM1510 22/69 doc id 022713 rev 1 figure 15. microsd card organization note: the user can add his/her 16-bit bitmap images (320x240) and wave files in the user folder. at any demo level, if the sd card is removed, the demo stops and the message shown in figure 16 is displayed on the lcd screen.
UM1510 running the demonstration doc id 022713 rev 1 23/69 figure 16. sd card removal 2.4 demo applications the following section provides a detailed description of each part of the demonstration. note: in the demonstration, the core runs at hclk = 32 mhz. four leds (ld1, ld2, ld3 and ld4) flash throughout the demonstration at a frequency depending on the core clock. 2.4.1 product presentation this part of the demo is dedicated to the listing of all the embedded stm32l152zd(t6) peripherals and features. this presentation of the microcontroller is made with a set of slides accompanied by a speech. each slide is associated with a dedicated speech (wave file). when the user starts the product presentation, the first slide appears and the corresponding speech starts. once the speech is finished, the second slide is displayed accompanied by its speech, and so on until the last slide. when the product presentation menu is selected, the message shown in figure 17 is displayed on the lcd screen. figure 17. product presentation is ready to start err: sdcard removed please check sd card press joystick up to restart the demo... put the headphone into when presentation starts use right and left to go to the next/previous slide and sel to exit your ears and press sel to start
running the demonstration UM1510 24/69 doc id 022713 rev 1 product presentation slides the set of slides is composed of 14 slides listing all features and advantages of the stm32l152zd(t6). figure 18 and figure 19 show the first and last slides, respectively. figure 18. first presentation slide figure 19. last presentation slide product presentation speech the stm32l152zd microcontroller has an embedded i2s2 peripheral that can be used for audio communication. an external audio codec cs43l22 is implemented on the evaluation board in order to allow speech audio files to be played through the embedded headphone.
UM1510 running the demonstration doc id 022713 rev 1 25/69 the properties of the product presentation speech wave files are the following: playing time: 6 min 16 s file number: 14 wave files file names: wave_si (i designed the slide index) format tag: pcm channels: stereo sample rate: 8 khz bits per sample: 16 bits note: if any wave files of the promotion presentation speech is not loaded in the dedicated memory, the message shown in figure 20 is displayed on the lcd screen. figure 20. no loaded wave file to stop the product presentation slide show and speech, push the sel push-button. the message shown in figure 21 is displayed. figure 21. end of slide show at the end of the product presentation, or if the presentation was stopped, simply press any joystick key to exit and return to the product presentation submenu. 2.4.2 calendar the stm32l1xx features a real-time clock (rtc) which is an independent bcd timer/counter. the rtc provides a time-of-day clock/calendar, two programmable alarm interrupts, and a periodic programmable wakeup flag with interrupt capability. end of slide show click to exit error: no wave file press joystick to exit... end of slide show exit: push joystick
running the demonstration UM1510 26/69 doc id 022713 rev 1 this submenu is used to configure the time, date and alarm. in any submenu, if the time and date parameters have not yet been configured, the message shown in figure 22 is displayed on the lcd screen. figure 22. setting the time and date the user can choose to set or not the time, year, month and day. press any key (except for sel) to ignore the prompt and abort the configuration sequence. press sel and follow the setting sequence to set the time and date. time submenu this submenu is divided into two items that allow the user to display or set the current time. time adjust: after the evaluation board is powered-up, select this submenu to change the default time (00:00:00) to the current time. once time adjust has been selected, the first digit of the hour field can be changed. press the up button to display the current value plus one. press the down button to display the previous digit value. after setting the digit value, press sel, and the cursor automatically jumps to the next digit. when all the time digits have been set, the time submenu appears. some digit values are limited to a range of values depending on the field (hour, minutes or seconds). the following message (with the default time or the current time) is displayed on the lcd when this submenu is selected. figure 23. time adjust submenu time show: this item displays the current time. if time and date have not been configured before, a message is displayed, prompting the user to set the time and date or to exit to the upper submenu. when this submenu is selected, the message shown in figure 24 appears on the lcd. in the example, the time has not been set yet.
UM1510 running the demonstration doc id 022713 rev 1 27/69 figure 24. time show submenu to exit the time show submenu, press the sel push-button. to exit the time submenu, select the return line and press the sel push-button. date submenu this submenu is divided into two items that allow the user to display or set the current date. date adjust: select this item after each power-up in order to set the current date. if the time and date have not been configured before, a message is displayed, prompting the user to set the time and date or to exit to the upper submenu. the user is requested to set the current date to be stored in the application memory. the date is displayed as year, month, week nbr, day nbr (number of the day in the year) with the selected day shown in the month. there is no default date since the user has to set the date at least once. once the submenu has been selected, the user starts by setting the year, then the month and the day of the selected month. the month and the year are selected using the up or down push-button. for the day, the up, down, right and left push- buttons can be used. press the up push-button to display the current value plus one; press the down push-button to display the previous value. to confirm the selected month, press the sel push-button. the display then jumps to the year configuration. the same procedure is applicable for the year configuration. after configuring the day, press the sel push-button to store the entered value and exit to the date submenu. the current date value is then shown and you can change the setting if required. th e messages shown in figure 25 , figure 26 and figure 27 are successively displayed on the lcd when this submenu is selected.
running the demonstration UM1510 28/69 doc id 022713 rev 1 figure 25. setting the year figure 26. setting the month
UM1510 running the demonstration doc id 022713 rev 1 29/69 figure 27. setting the day of the month date show: this item displays the current date. if the time and date have not been configured before, a message is displayed, prompting the user to set the time and date or to exit to the upper submenu. the message shown in figure 28 is displayed on the lcd when the submenu is selected (with the date already configured). figure 28. exiting the date show submenu to exit this submenu, press the sel push-button. to exit the date submenu, select the return line and press the sel push-button. alarm submenu using this submenu, the user can configure the alarm activation time. when the alarm time value is reached, all the leds (led1 to led4) start flashing together for 30 seconds. this submenu is divided into two items that allow the user to display or set the current alarm. alarm adjust: the alarm time activation is set in the same way as the time in the time adjust submenu. the following messages are successively displayed on the lcd when this submenu is selected:
running the demonstration UM1510 30/69 doc id 022713 rev 1 figure 29. setting the alarm activation time alarm show: this item displays the current alarm time. the default alarm activation time displayed after power-up and before setting in the alarm adjust submenu is 00:00:00. if the time and date have not been configured before, a message shown in figure 31 is displayed. pressing sel takes you back to the alarm submenu. the message shown in figure 30 is displayed on the lcd when this submenu is selected. figure 30. alarm show submenu to exit the alarm show submenu, press the sel push-button. to exit the alarm submenu, select the return line and press the sel push-button. note: in the alarm adjust and alarm show menus, if the time and date have not yet been configured, the message shown in figure 31 is displayed on the lcd screen.
UM1510 running the demonstration doc id 022713 rev 1 31/69 figure 31. message displayed if time and date need setting note: when the calendar is configured, the following messages are displayed respectively in an infinite loop on lcd glass stm32l, time and date. the lcd glass contrast is adjusted according to the brightness detected using the ldr resistor connected to comp2. 2.4.3 image viewer submenu the image viewer submenu is used to demonstrate the lcd control performance using the embedded fsmc interface. the application is a successive display of stored images. this application reads all bitmap pictures from the user directory (see section 4.1: programming the media files and displays only the .bmp files having the following format: bit depth: 16 bits (rgb) size: 240x320 select image viewer to display the submenu shown in figure 32 . figure 32. image viewer submenu when image viewer is selected, a list box of images is displayed as shown in figure 33. using the up, down and sel push-button, the user can select and view any image from the listbox. image viewer return image viewer
running the demonstration UM1510 32/69 doc id 022713 rev 1 figure 33. stm32 image viewer listbox when image viewer is selected, the corresponding image is displayed and then the user can use right and left push-buttons to go to the next/previous image stored in the user folder on the microsd card. if the down push-button is pressed, the image viewer is stopped and the listbox shown in figure 33 is displayed. if the left or right push-button is pressed, the image viewer is stopped and the submenu shown in figure 32 is displayed. the supported image size is 240x320. the maximum number of images that can be read from the microsd card is 25 images, selected in alphabetic order. 2.4.4 wave player submenu stm32l152d-eval evaluation board supports stereo audio play thanks to an audio codec cs43l22 connected to i2s2 port and controlled by i2c1 interface. in this demo, any wave file stored under the user folder in the microsd card can be opened using the fatfs file system and transferred to the internal sram by block (512 bytes) using the dma and the sdio interfaces. all the wave files properties are read from the wave file header. figure 34. audio playback architecture app main menu name
UM1510 running the demonstration doc id 022713 rev 1 33/69 this application reads all wave files from the user directory (see section 4.1: programming the media files ) and plays only the .wav files having the following format: audio format: pcm (an uncompressed wave data format in which each value represents the amplitude of the signal at the time of sampling) sample rate: should be lower than 32,000 hz. bits per sample: 16 bits (audio sample data values are in the range [0-65535]) number of channels: 2 (stereo) the maximum number of wave files that can be read from the microsd card is 25 files selected by alphabetic order. select wave player to display the submenu shown in figure 35 . figure 35. wave player submenu when wave player is selected again, the wave player file names are displayed as a listbox, as shown in figure 36 . figure 36. wave player interface using up, down and sel push-buttons, the user can select the desired wave file to be played. once the play command is activated, the submenu shown in figure 37 is displayed. wave player return wave player
running the demonstration UM1510 34/69 doc id 022713 rev 1 figure 37. wave player now playing submenu the progress bar and the volume value are displayed at the bottom of the wave player now playing submenu. the progress bar is updated every ~1% of the audio file duration, and the volume value is updated each time the volume level is changed. at this application level: press the sel push-button to pause/play the audio stream. press the left push-button to stop the audio stream. press the right push-button to exit the audio stream. press the down push-button to decrease the volume level. press the up push-button to increase the volume level. when the audio stream is finished or the right push-button is pressed, the menu in figure 36 is displayed. if the right push-button is pressed, the wave player is stopped and the submenu shown in figure 35 is displayed. note: the audio files provided within this package are based on a free music download from www.danosongs.com website. 2.4.5 voice recording the stm32l152zd(t6) microcontroller has an embedded adc and an embedded opamp1 which can be used to record a voice (signal coming from the u3 microphone). the opamp1 acts as a low pass filter. in this demo, the recorded wave buffers can be transferred from the internal sram by block (512 bytes) and stored under the rec folder in the microsd card using the fatfs file system and based on dma and sdio. timer3(tim3) triggers the adc to generate the sampling frequency. when the voice recording submenu is selected, the message shown in figure 38 is displayed on the lcd. right fwd
UM1510 running the demonstration doc id 022713 rev 1 35/69 figure 38. voice recording submenu selected if the record submenu has been selected by pressing the sel push-button, the voice recording interface is di splayed, as shown in figure 39 . figure 39. voice recording submenu once the record command is activated (by pressing the sel push-button), the submenu shown in figure 40 is displayed. voice recording record player return
running the demonstration UM1510 36/69 doc id 022713 rev 1 figure 40. starting voice record the recorded wave file properties are displayed on the right side of the submenu. when the down push-button is pressed, the menu in figure 38 is displayed. if the player submenu has been selected by pressing the sel push-button, the submenu shown in figure 37 is displayed. 2.4.6 idd measure the stm32l152zd(t6) microcontroller provides several operating modes reducing power consumption. the purpose of this menu is to use the adc peripheral features to measure the i dd current in run 32mhz, run 1mhz, run lp, sleep, sleep lp, stop and standby modes, and to measure the bias current using the i dd measurement circuit available on the stm32l152zd-eval board. during all idd measure applications, the v dd is measured in real time using the adc internal v ref measurement. this value is used to compute the i dd current. select the idd measure menu by pressing sel from the main menu. the message shown in figure 41 is then displayed on the lcd screen.
UM1510 running the demonstration doc id 022713 rev 1 37/69 figure 41. i dd measure menu if the idd run 32mhz mode submenu is selected, the run message is displayed on the lcd glass and the message shown in figure 42 is displayed on the lcd screen. figure 42. run 32mhz mode display submenu the i dd value is displayed on the lcd screen until the joystick push-button is pressed. once the joystick push-button is pressed, the mcu exits the idd run 32mhz mode submenu, the stm32l message is displayed on the lcd glass and the message shown in figure 41 is displayed on the lcd screen. if the idd run 1mhz mode submenu is selected, the stm32l message is displayed on the lcd glass and the message shown in figure 43 is displayed on the lcd screen. idd run 32mhz mode bias measurement idd run 1mhz mode idd sleep mode idd measure idd run lp mode idd stop mode idd sleep lp mode idd standby mode return run at system clock to exit press joystick 32mhz and all peripheral on idd: xxx,xxx ma stm32l lowpower mode press joystick to continue.
running the demonstration UM1510 38/69 doc id 022713 rev 1 figure 43. run 1mhz mode display submenu the i dd value is displayed on the lcd screen until the joystick push-button is pressed. once the joystick push-button is pressed, the mcu exits the idd run 1mhz mode submenu, the stm32l message is displayed on the lcd glass and the message shown in figure 41 is displayed on the lcd screen. if the idd run lp mode submenu is selected, the run lp message is displayed on the lcd glass and the message shown in figure 44 is displayed on the lcd screen. press sel push-button to keep rtc peripheral on during run lp mode, else press any other key push-button to stop rtc during this mode. once pressed, the message shown in figure 45 is displayed on the lcd. the mcu enters in run lp mode and waits for the rising edge on pa0 that can be generated by the external counter to exit the mcu from run lp. figure 44. rtc on or off selection submenu run at msi 1mhz and to exit press joystick all peripheral on idd: xxx,xxx ma rtc on or off off: press any key on: press sel
UM1510 running the demonstration doc id 022713 rev 1 39/69 figure 45. enter run lp mode submenu when the external rising edge is generated on pa0, the mcu exits the run lp mode, the stm32l message is displayed on the lcd glass and the message shown in figure 46 is displayed on the lcd screen. figure 46. run lp mode display submenu once the joystick push-button has been pressed, the mcu exits the idd run lp mode submenu and the message shown in figure 41 is displayed on the lcd screen. note: after executing the run lp mode submenu, if the rtc is off, you have to re-configure the time, date and alarm (refer to calendar menu). if the idd sleep mode submenu is selected , the sleep message is displayed on the lcd glass and the message shown in figure 47 is displayed on the lcd screen. the mcu enters in sleep mo de and waits for the rising edge on pa0 (push-button) to exit the sleep mode. mcu in run lp mode from flash memory all peripherals off run at msi 32khz all i/o in analog input and rtc off (on) run lp mode press joystick to continue. idd: xxx,xxx ua mcu in run lp mode press joystick to continue. idd: xxx,xxx ua stm32l lowpower mode from flash memory all peripherals off run at msi 32khz all i/o in analog input and rtc off (on)
running the demonstration UM1510 40/69 doc id 022713 rev 1 figure 47. enter sleep mode submenu when the user generates the external rising edge on pa0 by pressing the push-button, the mcu exits the sleep mode, the stm32l message is displayed on the lcd glass and the idd is displayed on the lcd screen as shown in figure 48 . figure 48. sleep mode display submenu once the joystick push-button has been pressed, the mcu exits the idd sleep mode submenu and the message shown in figure 41 is displayed on the lcd screen. note: when sleep mode is entered, the system clock is configured to run at 16 mhz, all peripherals are off, all i/os are configured as analog inputs, the ultralow power feature is enabled, and the flash memory is in power-down. if the idd sleep lp mode submenu is selected, the me ssage shown in figure 49 is displayed. press sel push-button to keep rtc peripheral on during sleep lp mode, else press any other key push-button to stop rtc during this mode. once pressed, the message shown in figure 50 is displayed on the lcd. mcu in sleep mode 16mhz, rtc on, all peripherals off and run at system clock i/os in analog input press key button to wake up sleep mode press joystick to continue. idd: xxx,xxx ma
UM1510 running the demonstration doc id 022713 rev 1 41/69 figure 49. enter sleep lp mode submenu once the joystick push-button has been pressed, the mcu enters in sleep lp mode and waits for the rising edge on pa0, that can be generated by the external counter, to exit the mcu from sleep lp mode. when the external rising edge is generated on pa0, the mcu exits the sleep lp mode and the message shown in figure 50 is displayed on the lcd screen. figure 50. sleep lp mode display submenu once the joystick push-button has been pressed, the mcu exits the idd sleep lp mode submenu and the message shown in figure 41 is displayed on the lcd screen. note: when sleep lp mode is entered, the system clock is configured to run at msi 32 khz, all peripherals are off, all i/os are configured as analog inputs, the rtc is set to off, the ultralow power feature is enabled, and the flash memory is in power-down. after executing the sleep lp mode submenu, the rtc is off. refer to calendar menu to re-configure the time, date and alarm. if the idd stop mode submenu is selected, the stop message is displayed on the lcd glass and the message shown in figure 51 is displayed on the lcd screen. mcu will be in sleep peripherals off, all i/o in analog run at msi 32khz all input and rtc off press joystick to continue. lp mode sleep lp mode press joystick to continue. idd: xxx,xxx ua
running the demonstration UM1510 42/69 doc id 022713 rev 1 figure 51. enter stop mode submenu once the joystick push-button has been pressed, the mcu enters in stop mode and waits for the rising edge on pa0, that can be generated by the external counter, to exit the mcu from stop mode. when the external rising edge is generated on pa0, the mcu exits the stop mode, the stm32l message is displayed on the lcd glass and the message shown in figure 52 is displayed on the lcd screen. figure 52. stop mode display submenu once the joystick push-button has been pressed, the mcu exits the idd stop mode submenu and the message shown in figure 41 is displayed on the lcd screen. note: when stop mode is entered, all peripherals are off, all i/os are configured as analog inputs and the rtc is off. after executing the stop mode submenu, if the rtc is off, you have to re-configure the time, date and alarm (refer to calendar menu). if the idd standby mode submenu is selected, the standby message is displayed on the lcd glass and the message shown in figure 53 is displayed on the lcd screen. press sel push-button to keep rtc peripheral on during standby mode, else press any other key push-button to stop rtc during this mode. once pressed, the message shown in figure 54 is displayed on the lcd. mcu will be in stop all peripherals off all i/o in analog input and rtc off press joystick to continue. mode stop mode press joystick to continue. idd: xxx,xxx ua
UM1510 running the demonstration doc id 022713 rev 1 43/69 figure 53. enter standby mode submenu-1 once the rtc is configured and the joystick push-button has been pressed, the message shown in figure 54 is displayed. figure 54. enter standby mode submenu-2 once the joystick push-button has been pressed, the mcu enters in standby mode and waits for the rising edge on pa0, that can be generated by the external counter, to exit the mcu from standby mode. when the external rising edge is generated on pa0, the mcu exits the standby mode, the system reset is generated and the message shown in figure 55 is displayed on the lcd screen. time and date must - if rtc already configured press any other joystick. be configured before - to configure rtc press joystick sel. entering in standby mode mcu will be in standby mode all peripherals off all i/o in analog press joystick to continue. input and rtc on.
running the demonstration UM1510 44/69 doc id 022713 rev 1 figure 55. standby mode display submenu once the joystick push-button has been pressed, the mcu continues the initialization as illustrated in section 2.1.1: demo startup . bias measurement: in low power mode, the bias current of an operational amplifier input is not negligible as compared to the idd current (typical ibias is ~240 na). to obtain a reliable mcu idd measurement, it is possible to subtract the bias current from the idd low power measurement, since this current is not sinked by the mcu. select the bias measurement menu by pressing sel from the idd measure menu. the message shown in figure 56 is then displayed on the lcd screen. figure 56. i dd bias measurement menu if the measure bias mode submenu is selected, the bias message is displayed on the lcd glass and the message shown in figure 57 is displayed on the lcd screen. standby mode press joystick to continue. idd: xxx,xxx ua measure bias return reset bias value bias measurement
UM1510 running the demonstration doc id 022713 rev 1 45/69 figure 57. measure bias submenu if the joystick push-button has been pressed, the mcu exits the measure bias submenu and the message shown in figure 56 is displayed on the lcd screen. if the sel push-button has been pressed, the mcu starts the measure bias submenu and the message shown in figure 58 is displayed on the lcd screen. figure 58. measure bias mode (procedure start) submenu once the joystick push-button has been pressed, the mcu enters the stop mode and waits for the rising edge on pa0, that can be generated by the external counter, to exit the mcu from stop mode. when the external rising edge is generated on pa0, the mcu exits the stop mode, the stm32l message is displayed on the lcd glass and the message shown in figure 59 is displayed on the lcd screen. current bias value idd: xxx,xxx ua stored in dataeeprom current bias value exit. sel push-button. to start bias measurement press press joystick to mcu will be in stop bias measurement make sure that jp4 is in position 1<->2 press joystick to continue. mode
running the demonstration UM1510 46/69 doc id 022713 rev 1 figure 59. stop mode display submenu once the joystick push-button has been pressed, the mcu exits the bias measure submenu and the message shown in figure 56 is displayed on the lcd screen. the measured bias value is st ored in the internal data eeprom memory. this value will be used with low power modes current measurement. if the reset bias value submenu is selected, the bias message is displayed on the lcd glass and the message shown in figure 60 is displayed on the lcd screen. figure 60. reset bias value submenu if the joystick push-button has been pressed, the mcu exits the reset bias value submenu and the message shown in figure 56 is displayed on the lcd screen. if the sel push-button has been pressed, the mcu starts the reset bias value submenu and the message shown in figure 61 is displayed on the lcd screen. press joystick to continue. idd: xxx,xxx ua stm32l lowpower mode mcu will be in stop bias measurement make sure that jp4 is in position 1<->2 mode current bias value idd: xxx,xxx ua stored in dataeeprom current bias value exit. sel push-button. to reset bias measurement press press joystick to
UM1510 running the demonstration doc id 022713 rev 1 47/69 figure 61. reset bias value (procedure start) submenu once the joystick push-button has been pressed, the mcu exits the reset bias value submenu and the message shown in figure 56 is displayed on the lcd screen. 2.4.7 thermometer the stm32l152zd(t6) microcontroller has two embedded i 2 c peripherals that can be connected to any device supporting the i 2 c protocol including the system management bus (smbus) mode. an stlm75 (or a compatible device) i 2 c temperature sensor is mounted on the stm32l152d-eval board and used to capture the external temperature (-55c to +125c). when the thermometer submenu is selected, the message shown in figure 62 is displayed on the lcd. figure 62. thermometer submenu selected once the temperature submenu has been selected by pressing the sel push-button, the temperature value is displayed in celsius and fahrenheit, as shown in figure 63 . press any key to return to the thermometer submenu. bias measurement bias value is reset to 0x0. press joystick to continue. thermometer return temperature
running the demonstration UM1510 48/69 doc id 022713 rev 1 figure 63. temperature display the temperature variations can be easily monitored using the stm32 i2c smbus feature. this is managed by the smbus alert, which generates a dedicated interrupt informing the system that the temperature is out of the selected ranges. this can be very useful when a higher temperature needs an emergency action, as is the case in critical systems (motor control, medical...). if the temperature exceeds the over-limit high (temperature_tos: over limit temperature) the smbus alert interrupt is generated and the warning message shown in figure 64 is displayed on the lcd screen. figure 64. warning temperature display the messages shown in figure 63 are displayed on the lcd screen when the temperature goes under the over limit low (temperature_thys: hysteresis temperature). the user can configure the tos and thys using dedicated define values in the code. by default, the stm32l152d-eval demo sets them to (see menu.c file): #define temperature_thys 31 #define temperature_tos 32 press any key to return to the thermometer submenu. note: any hardware trouble with the temperature sensor is detected by a test. in such a case, the message shown in figure 65 is displayed. temperature +xxx.x c +xxx.x f temperature +xxx.x c +xxx.x f exceeding the t?limi 32 c
UM1510 running the demonstration doc id 022713 rev 1 49/69 figure 65. temperature sensor error 2.4.8 usb mass storage submenu the stm32l152zd(t6) microcontroller features a usb (universal serial bus) that provides a full-speed interface to a usb host pc. the usb mass storage submenu is used to configure the usb interface for communication with the pc and to run the mass storage demo using an msd card. figure 66. usb mass storage submenu if the sel push-button is pressed when start is selected, the message shown in figure 67 appears on the lcd screen until the cable is plugged in. end of slide show click to exit no tsensor present exit: push joystick usb mass storage return start nand physical format
running the demonstration UM1510 50/69 doc id 022713 rev 1 figure 67. usb mass storage submenu selected to return to the previous submenu, the user must connect a usb cable between the usb connector type b (cn15) and the pc. if the user connects a cable or presses any joystick push-button, the message shown in figure 68 is displayed on the lcd. figure 68. usb cable connected once the cable has been connected, the pc recognizes the board as a mass storage device and consequently opens a window to show the contents of the msd mounted on the stm32l152-eval board. the user can transfer files between the msd and the pc. 2.4.9 dual interfac e eeprom (rf/i2c) the stm32l152zd(t6) microcontroller has two embedded i 2 c peripherals that can be connected to any device supporting the i 2 c protocol. an ant7-m24lr-a dual interface rf eeprom daughter board can be connected on cn12 to stm32l152d-eval via the i2c interface. note: for more details about th e dual interface eeprom daughter board, please refer to the ant7-m24lr-a databrief. plug the usb cable exit: push joystick to stop press sel
UM1510 running the demonstration doc id 022713 rev 1 51/69 figure 69. ant7-m24l r-a dual interface eepr om daughter board the m24lr64-r device is a dual-interface, electrically erasable programmable memory (eeprom). it features an i 2 c interface and can be operated from a v cc power supply. it is also a contactless memory powered by the received carrier electromagnetic wave at 13.56 mhz. the m24lr64-r is organized as 8192 8 bits in the i 2 c mode and as 2048 32 bits in the iso 15693 and iso 18000-3 mode 1 rf mode. figure 70. m24lr64-r block diagram note: for more details on the m24lr64 eeprom, please refer to the datasheet. select the dual interface (rf/i2c) eeprom me nu by pressing sel from the main menu. two applications can be selected, as shown in figure 71.
running the demonstration UM1510 52/69 doc id 022713 rev 1 figure 71. dual in terface eeprom a pplications menu esl application the electronic shelf labeling (esl) consists of reading (using i2c interface) the content of the dual interface eeprom and displaying the information on the lcd screen, as shown in figure 72 . figure 72. esl application all this information (product name, price, logo, price trend...) is programed in the m24lr64 dual interface eeprom in rf mode and can be updated any time using the cr95hf rfid reader/writer connected to the usb port of a pc host, with the associated m24lrxx_application_software pc software. esl return datalogger rf eeprom esl rf eerpom
UM1510 running the demonstration doc id 022713 rev 1 53/69 figure 73. esl setting menu using this pc software application, several parameters can be set to configure the esl device and update the lcd display mounted on the stm32l152d-eval: french / english logo : check the french (promo) or english (discount ) to indicate that a special price is proposed. check the blank logo if no special price is applied. orientation arrow : check the up or down arrow to indicate if the price has been increased or decreased, or the blank arrow if no indication is required. price : display the product price. ascii text line 1 and line 2 : display the name and a brief description of the product. the transfer data to your esl button of the pc esl demo software allows to program esl parameters in rf mode using the cr95hf rfid reader/writer demo board. esl data can be read from the m24lr64 dual interface eeprom using the read esl configuration button of the pc esl demo software application. when done, esl data written into the m24lr64 is displayed in the esl panel of the pc esl demo application. note: for more details about this pc software, please refer to user manual um0853 . esl parameters mapping into the m24lr6 4 dual interface eeprom are shown in ta b l e 4 : m24lr64 memory organization (esl application) . esl rf eerpom
running the demonstration UM1510 54/69 doc id 022713 rev 1 datalogger application this dual interface eeprom (rf /i2c) application pr esents a practical application for the m24lr64. it is able to record and store a 64-kbit temperature data using the m24lr64-r dual interface eeprom. the datalogger microc ontroller is an stm3 2l152zd (t6) which communicates with the m24lr64-r using its i2c serial interface and controls an stlm75 digital temperature sensor. figure 74. datalogger block diagram table 4. m24lr64 memory organization (esl application) rf block address bits [31:24] bits [23:16] bits [15:8] bits [7:0] 0000h arrow icon 0001h contains xyyyyyyyh x = number of digits (max 7) in price yyyyy = price value including decimal separator (.) coded in hexadecimal for instance, 512a99ffh means 5 digits and the price is 12.99 0002h contains the ascii codes of the string chain called ascii text line 1 in m24lr64 esl demo software. the maximum size of this text line is 20 characters 0003h 0004h 0005h 0006h 0007h contains the ascii codes of the string chain called ascii text line 2 in m24lr64 esl demo software. the maximum size of this text line is 20 characters 0008h 0009h 000ah 000bh 000ch xxxx xx is the checksum of byte s from address 0000h to 000bh yy: reserved zz: reserved esl rf eerpom
UM1510 running the demonstration doc id 022713 rev 1 55/69 temperature acquisition parameters (temperature acquisition start/stop, temperature acquisition period) ar e stored into the m24lr64 dual interface eeprom. changing these values and controlling the temperature acquisition is done in rf mode using the cr95hf rfid reader/writer demo board. during the temperature acquisition, data from the stlm75 digital temperature sensor is written into the m24lr64 by the stm32l152zd microcontroller in i2c mode and displayed on the stm32l252 eval board lcd screen. temperature data can be read in the same time in rf mode using the cr95hf rfid reader/writer demo board and be displayed in the pc datalogger software application. for more details about this application, please refer to the application note an 3109 ?developing your m24lr64-r datalogger application for temperature acquisition?. how to run the application: 1. from the stm32l125d evaluation board, select the datalogger submenu and then press the sel push-button. figure 75. datalogger dialog box 2. from the application software side, choose ?datalogger? application and then follow the steps described on the user manual, um0925. when the application starts, the data has been stored in the dual interface eeprom and this temperature data has been displayed as a real-time curve on the tft-lcd mounted on the evaluation board and also on the pc software interface. menu navigation help
running the demonstration UM1510 56/69 doc id 022713 rev 1 figure 76. datalogger curve reference documents: a) m24lr64-r datasheet b) m24lr64-r tool driver install guide user manual (um0863) c) using the m24lr64-r datalogger reference design user manual (um0925) d) how to manage m24lr64-r data transfers from the i2c bus or an rf channel e) application note (an3057) f) application note (an3109) g) ant7-m24lr-a data brief for more information about dual interface eeprom memories and associated demo boards and documentation, visit the dual interface eepprom page on www.st.com. for more information about the cr95hf multi protocol rfid transceiver technical documentation and associated resources, visit the cr95hf web page on www.st.com. 2.4.10 applications the stm32l152zd(t6) microcontroller has a new embedded rtc version 2 which can be used for many applications, such as stopwatch and timer. select applications to display the submenu shown in figure 77 . menu navigation help
UM1510 running the demonstration doc id 022713 rev 1 57/69 figure 77. applications menu stopwatch application this application simulates a pr ecise chronometer with 5 record time possibilities stored in the backup registers (5 registers for time - seconds, minutes and hours) and 5 registers for sub-seconds). for this application, an interactive human interface is developed using stm32l152d_eval?s lcd and push-buttons, to allow the user to use stopwatch with real- time display. figure 78. stopwatch submenu after startup, a default 00:00:00:000 chronometer counter is displayed on the lcd, corresponding to [h ours]:[minutes]:[seco nds]:[milliseconds]. the user can manipulate the chronometer features using the joystick left, right and down push-buttons: press the joystick left button to start the counter. press the joystick right button to save trials in the backup registers (max 5 actions). press the joystick down button to exit. press and hold the tamper button for 1 sec to reset all the backup registers. stopwatch ldr timer applications return stopwatch applications
running the demonstration UM1510 58/69 doc id 022713 rev 1 timer application this application simulates a precise hourglass. it measures the passage of a few time units (sub-seconds, seconds or minutes). for this application, an interactive human interface has been developed using stm32l152d_eval?s lcd and push-buttons to allow the user to use stopwatch with real-time display. after startup, the hourglass is full and the default timer is one minute. using the up and down push-buttons, the user can change the timer duration (the timer duration must be higher than 13 seconds). figure 79. timer submenu the user can manipulate the hourglass featur es using the joystick left, right, up and down buttons: press the joystick right button to start the timer. press again the joystick right button to stop the timer. press the joystick left button to reset the timer. press the joystick up/down button to adjust the timer (up and down are only used when the timer is reset). ldr application the stm32l152zd(t6) microcontroller has an embedded comparator which can be used in combination with the dac peripheral for more applications, such as the measuring of light intensity (using the ldr sensor). when the ldr submenu is selected, the message shown in figure 80 is displayed. stopwatch applications
UM1510 running the demonstration doc id 022713 rev 1 59/69 figure 80. light intensity level according to the light intensity level, the icons are changed and also the progress bar. 2.4.11 help this submenu can help the user to configure the jumpers on the stm32l152-eval evaluation board and to navigate between the menus and submenus available in the firmware demo. select the help menu by pressing sel from the main menu. the message shown in figure 81 is then displayed on the lcd screen. figure 81. help menu if menu navigation submenu is selected, the message shown in figure 82 is displayed. menu navigation return jumpers config help
running the demonstration UM1510 60/69 doc id 022713 rev 1 figure 82. navigation menu-1 when any joystick button is pressed, the second navigation interface is displayed, as shown in figure 83. figure 83. navigation menu-2 once the joystick push-button has been pressed again, the mcu exits the navigation submenu and the message shown in figure 81 is displayed on the lcd screen. if the jumpers config submenu is selected, the message shown in figure 84 is displayed. up, down, right and left push-buttons perform circular navigation in the main menu, current menu items. sel push-button selects the current item. up and down perform vertical navigation
UM1510 running the demonstration doc id 022713 rev 1 61/69 figure 84. jumpers config menu-1 press right and left to go to the next/previous slide and sel to exit. the following messages shown in figure 85 , figure 86, figure 87 and figure 88 are displayed sequentially on the lcd screen. figure 85. jumpers config menu-2 use right and left the needed jumpers configuration: to go to the next/previous slide and sel to exit - vdd voltage: the needed jumpers configuration: jp5 fitted pos 3.3v - audio demo: jp2 fitted pos 2<->3 and jp7 in pos 2<->3 - thermometer demo: jp14: fitted
running the demonstration UM1510 62/69 doc id 022713 rev 1 figure 86. jumpers config menu-3 figure 87. jumpers config menu-4 - applications demo the needed jumpers configuration: jp2 in pos 1<->2 - lcd glass must be in io position - voice recording: jp6 and jp8 pos 1<->2 - lcd glass contrast the needed jumpers configuration: jp10 fitted pos ldr - audio out: jp16 not fitted - jp15, jp16 and jp9 not used by the demo
UM1510 running the demonstration doc id 022713 rev 1 63/69 figure 88. jumpers config menu-5 once the sel joystick push-button has been pressed, the mcu exits the jumpers config submenu and the message shown in figure 81 is displayed on the lcd screen. 2.4.12 about submenu this submenu shows the version of the stm32l152zd demo firmware. when the about submenu is selected, the message shown in figure 89 is displayed on the lcd screen. figure 89. about submenu pressing sel then displays a message showing the stm32l152d-eval demo version on the lcd screen. the idd bias current the needed jumpers configuration: in stop and standby modes is evaluated to 0.2ua refer to section: idd measurement improvement procedure in the user manual. about return about
stm32l152d-eval demonstration package UM1510 64/69 doc id 022713 rev 1 3 stm32l152d-eval demonstration package the stm32l152d-eval demonstration is supplied in one single zip file. the extraction of the zip file generates one folder, stm32l152d-eval_fw_vx.y.z, which contains the subfolders shown in figure 90 and described below. figure 90. stm32l152d-eval demo package directory tree
UM1510 stm32l152d-eval demonstration package doc id 022713 rev 1 65/69 1. libraries : contains all the subdirectories and files that make up the core of the stm32l1xx standard peripheral library v1.0.0: cmsis ? cm3\coresupport: contains the cortex-m3 files ? cm3\devicesupport\st\stm32l15x: contains the stm32l1xx cmsis layer files stm32l1xx_stdperiph_driver ? inc subfolder contains the standard peripheral library header files ? src subfolder contains the standard peripheral library source files stm32_usb-fs-device_driver ? inc subfolder contains the usb full speed peripheral library header files ? src subfolder contains the usb full speed peripheral library source files 2. project stm32l152d-eval ? binary: contains the binary image of the demonstration that can be used to program the binary image to the internal flash memory using iap, plus the media files required to run the demo (binary\media) ? ewarm: contains preconfigured projects for the ewarm toolchain ? mdk-arm: contains preconfigured pr ojects for the mdk-arm toolchain ? ride: contains preconfigured projects for the ride toolchain ? truestudio: contains preconfigured projects for the atollic toolchain ? hitop: contains preconfigured projects for the hitop toolchain ? inc: contains the demo header files ? src: contains the demo source files 3. utilities ? stm32l152-eval: contains the lcd, and other stm32l152d-eval board- related drivers
stm32l152d-eval demonstration programming UM1510 66/69 doc id 022713 rev 1 4 stm32l152d-eval demonstration programming 4.1 programming the media files the stm32l152d-eval board comes with a microsd card memory preprogrammed with audio and image resources used by the demonstration. however, you can load your own image (*.bmp) and audio (*.wav) files in the user directory, respectively, provided that these file formats are supported by the demonstration. for more details, please refer to section 2.4.3: image viewer submenu and section 2.4.4: wave player submenu . figure 91. sd card directory organization the default content of the media files (stfiles and user directories) can be retrieved from the binary\media folder. if the user wants to reprogram the microsd card, he can copy the content of the binary\media folder to his/her own sd memory. 4.2 programming the demo you can program the demonstration using four methods. 4.2.1 using bootloader to program the demonstration?s binary image into the internal flash memory, you have to use the stm32l152d_eval_fw_v1.0.0.bin file located under project\stm32l152d- eval\binary with embedded bootloader. for more details, please refer to bootloader application note an2606 stm32? microcontroller system memory boot mode . 4.2.2 using iap to program the demonstration's binary image into the internal flash memory, you have to use the stm32l152d-eval_fw_v1.0.0_offset_0x3000.bin file located under project\stm32l152d-eval\binary with iap over usart. for more details, please refer to iap application note an3310 stm32l1xx in-application programming using the usart .
UM1510 stm32l152d-eval demonstration programming doc id 022713 rev 1 67/69 4.2.3 using usb dfu to program the demonstration's binary image into the internal flash memory, you have to use the stm32l152d-eval_fw_v1.0.0.dfu file located under project\stm32l152d- eval\binary with usb dfu. for more details, please refer to user manual um0424 stm32 usb-fs-device development kit . 4.2.4 using preconfigured projects select the folder corresponding to your preferred toolchain (mdk-arm, ewarm, ride, tasking or truestudio). open the stm32l152d _eval project and re build all sources. load the project image through your debugger. restart the evaluation board (press b1: reset button).
revision history UM1510 68/69 doc id 022713 rev 1 5 revision history table 5. document revision history date revision changes 02-apr-2012 1 initial release.
UM1510 doc id 022713 rev 1 69/69 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by two authorized st representatives, st products are not recommended, authorized or warranted for use in milita ry, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2012 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of UM1510

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X